package com.ruo.usercenter.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruo.usercenter.pojo.User;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

/**
* @author 28724
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2023-05-24 18:59:32
*/
public interface UserService extends IService<User> {
    /**
     * 用户注册
     *
     * @param userAccount   用户账户
     * @param userPassword  用户密码
     * @param checkPassword 校验密码
     * @param userCode 星球编号
     * @return 新用户 id
     */
    Long userRegister(String userAccount, String userPassword, String checkPassword, String userCode);
    /**
     * 用户登录
     *
     * @param userAccount  用户账户
     * @param userPassword 用户密码
     * @param request
     * @return 脱敏后的用户信息
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);
    /**
     * 用户脱敏
     *
     * @param user
     * @return
     */
    User getSaftyUser(User user);

    int userLoginOut(HttpServletRequest request);

}
